const mongoose = require('mongoose');
const Schema = mongoose.Schema;


//实例化数据模板
const UserSchema = new Schema({
    name:{
        type:String,
        required:true
    },
    email:{
        type:String,
        required:true
    },
    password:{
        type:String,
        required:true
    },
    avatar:{
        type:String,
    },
    date:{
        type:Date,
        // required:true
        default: Date.now       
    }
})



module.exports = user = mongoose.model('users',UserSchema);
